package com.wondertek.service.service.business;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wondertek.common.base.Result;
import com.wondertek.service.dto.app.req.AppAccessoryPageReq;
import com.wondertek.service.dto.business.req.AccessoryAddReq;
import com.wondertek.service.dto.business.req.AccessoryPageReq;
import com.wondertek.service.dto.business.req.AccessoryUpdReq;
import com.wondertek.service.dto.business.res.AccessoryPageRes;
import com.wondertek.service.entity.business.AccessoryPo;
import com.wondertek.service.sdk.iotdh.dto.req.DeleteAccessoryReq;
import com.wondertek.service.sdk.iotdh.dto.req.SetAccessoryAreaReq;
import com.wondertek.service.sdk.iotdh.dto.req.SetAccessoryPairReq;
import com.wondertek.service.sdk.iotdh.dto.res.GetAccessoryInfoRes;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetector.SetDoorDetectorAccessoryInfoReq;
import com.wondertek.service.sdk.iotdh.dto.res.doorDetectorPlus.SetDoorDetectorPlusAccessoryInfoReq;
import com.wondertek.service.sdk.iotdh.dto.res.pir.SetPIRAccessoryInfoReq;

import java.util.List;

/**
 * @description:
 * @author: qinjianhui
 * @create: 2024-07-31 14:20
 **/
public interface AccessoryService extends IService<AccessoryPo> {

    void setDoorDetectorAccessoryInfo(SetDoorDetectorAccessoryInfoReq req);

    void setDoorDetectorPlusAccessoryInfo(SetDoorDetectorPlusAccessoryInfoReq req);

    void setPIRAccessoryInfo(SetPIRAccessoryInfoReq req);

    /*
    * 根据sn查询已删除的配件
    * */
    List<AccessoryPo> selectBysql(String code);

    /*
    * 挂载配件
    * */
    void setAccessoryPair(SetAccessoryPairReq req);

    /*
     * 配件详情
     * */
    Result<GetAccessoryInfoRes> detail(String id);

    /*
     * 分页查询
     * */
    Page<AccessoryPo> page(AppAccessoryPageReq req);


    Page<AccessoryPageRes> webPage(AccessoryPageReq req);

    /**
     * 新增配件
     * @param req
     * @return
     */
    void addAccessory(AccessoryAddReq req);


    /**
     * 修改配件
     * @param req
     * @return
     */
    void updAccessory(SetAccessoryAreaReq req);


    /**
     * 删除配件
     * @param accessoryId
     * @return
     */
    void delAccessory(DeleteAccessoryReq req);
}

